package com.byedu.jupiter.controller.user;

import com.byedu.jupiter.domain.UserDO;
import com.byedu.jupiter.service.system.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by jason on 2017/6/1.
 */
@Controller
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping(value = "/showUser", method = {RequestMethod.GET})
    public String toIndex(ModelMap model){
        UserDO userDO = userService.selectUserById(1);
        model.addAttribute("user", userDO);
        return "showUser";
    }
}
